package main

import (
	"Go36/article15/example06/model"
	"fmt"
	"unsafe"
)

func main() {
	s1 := model.Student{}
	s1P := &s1
	s1Ptr := uintptr(unsafe.Pointer(s1P))
	namePtr := s1Ptr + 0
	agePtr := s1Ptr + 16
	fmt.Println(namePtr, agePtr)
	// nameP := (*string)(unsafe.Pointer(namePtr))
	// ageP := (*int)(unsafe.Pointer(agePtr))
	// *nameP = "Adam"
	// *ageP = 22
	fmt.Println(s1)
}